/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.edu.kamai.webservice;

import com.edu.kamai.logic.facade.ScoreFacade;
import com.edu.kamai.persistence.beans.Score;
import java.util.List;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.ejb.Stateless;

/**
 *
 * @author xyzhu
 */
@WebService(serviceName = "scoreService")
@Stateless()
public class scoreService {

    /**
     * Web 服务操作
     */
    @WebMethod(operationName = "updateScoreByContestIDAndStudentID")
    public int updateScoreByContestIDAndStudentID(@WebParam(name = "cID")
    int cID, @WebParam(name = "uID")
    String uID, @WebParam(name = "score")
    int score, @WebParam(name = "finishTime")
    int finishTime, @WebParam(name = "type")
    int type) {
        return ScoreFacade.updateScoreByContestIDAndUserID(
                cID, uID, score, finishTime, type);
    }

    /**
     * Web 服务操作
     */
    @WebMethod(operationName = "getScoreByUserID")
    public List<Score> getScoreByUserID(@WebParam(name = "UID")
    String UID) {
        //TODO write your implementation code here:
        return ScoreFacade.getScoreByUserID(UID);
    }
}
